[FLINK-38262][table] show connections operation - #28790
Open
Shekharrajak wants to merge 2 commits into
Open
Conversation
Generated-by: Codex (GPT-5)
Shekharrajak
force-pushed
the
FLINK-38262-show-connections-operation
branch
from
July 21, 2026 17:10
f0455b5 to
df55cc1
Compare
snuyanzin
requested changes
Jul 21, 2026
snuyanzin
left a comment
Contributor
There was a problem hiding this comment.
Please do not ignore Contributors form
raminqaf
reviewed
Jul 27, 2026
raminqaf
left a comment
Contributor
There was a problem hiding this comment.
overall looks good. Left a nit
Contributor
Author
|
@flinkbot run azure |
snuyanzin
reviewed
Jul 28, 2026
Comment on lines
+82
to
+99
| void testShowConnections() { | ||
| tEnv().executeSql("CREATE TEMPORARY CONNECTION b_conn WITH ('k' = 'v')"); | ||
| tEnv().executeSql("CREATE TEMPORARY CONNECTION a_conn WITH ('k' = 'v')"); | ||
|
|
||
| assertThat(collectRows("SHOW CONNECTIONS")) | ||
| .containsExactly(Row.of("a_conn"), Row.of("b_conn")); | ||
| } | ||
|
|
||
| @Test | ||
| void testShowConnectionsLike() { | ||
| tEnv().executeSql("CREATE TEMPORARY CONNECTION prod_conn WITH ('k' = 'v')"); | ||
| tEnv().executeSql("CREATE TEMPORARY CONNECTION tmp_conn WITH ('k' = 'v')"); | ||
|
|
||
| assertThat(collectRows("SHOW CONNECTIONS LIKE 'prod_%'")) | ||
| .containsExactly(Row.of("prod_conn")); | ||
| assertThat(collectRows("SHOW CONNECTIONS NOT LIKE 'prod_%'")) | ||
| .containsExactly(Row.of("tmp_conn")); | ||
| } |
Contributor
There was a problem hiding this comment.
why do we need 2 separate tests?
why same can't be done in one?
snuyanzin
reviewed
Jul 28, 2026
| SqlShowConnections sqlShowCall, | ||
| @Nullable String catalogName, | ||
| @Nullable String databaseName, | ||
| String prep, |
snuyanzin
reviewed
Jul 28, 2026
|
|
||
| private List<Row> collectRows(String sql) { | ||
| TableResult result = tEnv().executeSql(sql); | ||
| return CollectionUtil.iteratorToList(result.collect()); |
Contributor
There was a problem hiding this comment.
if you look at javadoc of this method it does not match recommended way to call it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
Adds ShowConnectionsOperation and converter support for SHOW CONNECTIONS, including catalog/database qualification and LIKE filtering.
Ref https://issues.apache.org/jira/browse/FLINK-38262
Brief change log
Add SHOW CONNECTION operation
Verifying this change
Unit tests and IT
Does this pull request potentially affect one of the following parts:
@Public(Evolving): (yes / no) noDocumentation
Was generative AI tooling used to co-author this PR?